package com.itany.thread.test04;

import java.util.HashMap;
import java.util.Map;

public class MyThreadLocal<T> {
	private Map<Thread,T> local = new HashMap<>();
	
	public void set(T t){
		local.put(Thread.currentThread(), t);
	}
	
	public T get(){
		return local.get(Thread.currentThread());
	}
}
